<?php 
	require_once("header.php");
	
?>
<script type="text/javascript">
		$(document).ready(function() {
		  $('#file_upload').uploadify({
		    'uploader'  : '../js/uploadify/uploadify.swf',
		    'script'    : '../js/uploadify/uploadify.php',
		    'cancelImg' : '../js/uploadify/cancel.png',
		    'folder'    : '../js/uploadify/uploads',
		    'auto'      : true,
		    'fileExt'     : '*.csv',
		    'fileDesc'    : 'CSV File Only (*.csv)',
		    'onAllComplete' : function(event,data) {
			    var ajaxRequest = new XMLHttpRequest(); 
			    ajaxRequest.open( "GET", "taController.php?request=upload-file", true );
			    ajaxRequest.onreadystatechange = function() {
				    if(ajaxRequest.readState==4) {
					    //window.alert(" records uploaded succesfully");
					    //do something here.=ajaxReqest.responseText;
				    }
			    }
			   ajaxRequest.send(null);
		    } //end onAllComplete
		  });
		});

</script> 




<div id="body" class="clear">
			<div class="clear">
				<div class="column">
					 <fieldset>
        
                        <legend>Upload File</legend>
                       	 	<p>Please choose a file to upload, please note that file can only be in csv format</p>
                     	    <input id="file_upload" name="file_upload" type="file" />
                     	     
                     	    <a href="javascript:$('#file_upload').uploadifyUpload();"></a>
                     	
                   	</fieldset>
            	</div>
			</div>
		</div>

	
<?php require_once('footer.php');?>